/**
 * 商品管理列表混入信息
 * */
import {
    mapState,
    mapMutations
} from 'vuex';

export default {
    data () {
        return {
            dynamicData: {},
            pagePath: '', // 当前路由
            formData: {}, // 表单提交数据
            auditType: '' // 审核类型
        }
    },
    computed: {
        ...mapState('admin/baseList', [
            'listData',
            'formItemData',
            'formItemDataRules'
        ])
    },
    created () {

    },
    methods: {
        ...mapMutations('admin/baseList', [
            'setListData',
            'setFormItemData',
            'setFormItemDataRules'
        ]),
        // 获取表格数据
        getData (formData) {
            let params = {
                afterServiceType: this.auditType,
                ...formData
            }
            this.$refs.table.getData(params);
        },
        // 点击TAB切换页面显示
        tabsHandleChange (obj) {
            this.auditType = obj.name
            this.getData();
        }
    }
}
